<include file="__THEME__/header" />
<include file="__THEME__/editor" />
<link rel="stylesheet" href="../Public/poster.css" type="text/css" media="screen" charset="utf-8" />
<script  type="text/javascript" src="../Public/poster.js" ></script>
<script  type="text/javascript" src="__PUBLIC__/js/rcalendar.js" ></script>
<include file="../Public/_mainNav" />
<div class="content"><!-- 内容 begin -->
  <div class="main no_l"><!-- 画布 begin -->
    <div class="mainbox">
      <div class="mainbox_R">
        <div class="right_box alC mt10"><a href="{:U('poster/index/addPosterSort')}" ><img src="../Public/images/add_btn.gif" /></a></div>
		<include file="../Public/_isHotList" />
      </div>
      <div class="mainbox_C">
  <div class=page_title> <!-- page_title begin -->
  <h2><img src="{$icopath}{$ico}" />发起{$name}</h2>
   <div style="padding-left:29px"><span class="cGray2">{$explain}</span></div>
  <div class="c"></div>
</div><!-- page_title end -->
  <div class="groupBox">
    <div class="boxL poster_boxL">
  	<div class="box1">
  	<php>if(!empty($smallType)){
  	  $hasType = "true";
  	}</php>
      <form method="post" action="{:U('poster/index/doAddPoster')}"  enctype="multipart/form-data" onsubmit="return check({$hasType})">
        <ul class="add_event">
          <php>if(!empty($smallType)){</php>
          <li>
            <div class="c1"> 类别：<span class="cRed pr5">*</span></div>
            <div class="c2">
                <?php foreach($smallType as $cate){ ?> <label class="mr5 left"><input type="radio" name="type" text="{$cate.name}" value="{$cate.id}" />{$cate.name}</label>
            <?php } ?>
            </div>
          </li>
          <php>}</php>
       	  <li>
       	    <div class="c1">标题：<span class="cRed pr5">*</span></div>
       	    <div class="c2"><input name="title" type="text" style="width:300px;" class="text" id="title" maxlength="60" />
       	    </div></li>
          <li><div class="c1"> 地点：<span class="cRed pr5">*</span></div>
                    <div class="c2">
                      <input type="text" id="selectarea" name="areaval" value="{$userInfo.area}" class="text" size="30" readonly />
                      <input type="button" class="btn_b" value="选择地区" onclick="selectArea()" />
                      <input type="hidden" id="current" name="areaid" value="{$userInfo.ts_areaval}" />
                    </div>
          </li>
          <li><div class="c1">截止时间：</div>
            <div class="c2"> <input id="deadline" name="deadline" value="{$deadline}" type="text" class="text" id="deadline" onfocus="rcalendar(this,'full');" style="width:200px" /></div>
          </li>          
          <li><div class="c1">详细介绍：<span class="cRed pr5">*</span></div><div class="c2">
            <textarea id="explain" name="explain" style="width:99%;height:350px"></textarea>
          </div></li>
          <volist name="extraField" id="vo">
            {:W($vo['widget'],$vo)}
          </volist>
          <li>
            <div class="c1">联系方式：&nbsp;&nbsp;&nbsp;</div>
            <div class="c2">
              <input name="contact" type="text" class="text" id="contact" size="30" />
              <br /><span class="cGray2">填写联系人电话，如：张小姐，1346665XXXX</span></div>
          </li>
          <li>
            <div class="c1">图片：&nbsp;&nbsp;&nbsp;</div>
            <div class="c2"> <input name="cover" type="file" class="text" /></div>
          </li>
          <li>
            <div class="c1">&nbsp;</div>
            <div class="c2">
                                    <input type="hidden" name="pid"  value="{$id}"/>
              <input name="button" type="submit" class="btn_b" id="button" value="确认发起" />
              </div>
          </li>
        </ul>
        </form>
    </div>
    </div> <!-- end  -->
 </div>
  </div><!-- 画布 end  -->
  <div class="c"></div>
  </div>
  </div>
</div><!-- 内容 end -->
<include file="__THEME__/footer" />
<script>
$(document).ready(function(){
    loadEditor("explain");
});currentDate();
function selectArea(){
    var typevalue = $("#current").val();
    ui.box.load(U('poster/Area/area')+'&selected='+typevalue,{title:'选择城市'});
}
</script>